


<!DOCTYPE html>
<html id="htmlId">
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 
  <title>Coverage Report > FocusServiceImpl</title>
  <style type="text/css">
    @import "../../css/coverage.css";
    @import "../../css/idea.min.css";
  </style>
  <script type="text/javascript" src="../../js/highlight.min.js"></script>
  <script type="text/javascript" src="../../js/highlightjs-line-numbers.min.js"></script>
</head>

<body>
<div class="content">
<div class="breadCrumbs">
Current scope:     <a href="../../index.html">all classes</a>
    <span class="separator">|</span>
    <a href="../index.html">com.ie.service.before</a>
</div>

<h1>Coverage Summary for Class: FocusServiceImpl (com.ie.service.before)</h1>

<table class="coverageStats">

<tr>
  <th class="name">Class</th>
<th class="coverageStat 
">
  Method, %
</th>
<th class="coverageStat 
">
  Branch, %
</th>
<th class="coverageStat 
">
  Line, %
</th>
</tr>
<tr>
  <td class="name">FocusServiceImpl</td>
<td class="coverageStat">
  <span class="percent">
    50%
  </span>
  <span class="absValue">
    (1/2)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    0%
  </span>
  <span class="absValue">
    (0/4)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    10%
  </span>
  <span class="absValue">
    (1/10)
  </span>
</td>
</tr>
  <tr>
    <td class="name">FocusServiceImpl$$SpringCGLIB$$0</td>
  </tr>
<tr>
  <td class="name"><strong>Total</strong></td>
<td class="coverageStat">
  <span class="percent">
    50%
  </span>
  <span class="absValue">
    (1/2)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    0%
  </span>
  <span class="absValue">
    (0/4)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    10%
  </span>
  <span class="absValue">
    (1/10)
  </span>
</td>
</tr>
</table>

<br/>
<br/>


<pre>
<code class="sourceCode" id="sourceCode">&nbsp;package com.ie.service.before;
&nbsp;
&nbsp;import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
&nbsp;import com.ie.common.http.ResponseResult;
&nbsp;import com.ie.entity.before.FocusEntity;
&nbsp;import com.ie.mapper.before.FocusMapper;
&nbsp;import org.springframework.stereotype.Service;
&nbsp;
&nbsp;import java.util.Date;
&nbsp;import java.util.Map;
&nbsp;
&nbsp;/**
&nbsp; * @author
&nbsp; */
&nbsp;@Service
<b class="fc">&nbsp;public class FocusServiceImpl extends ServiceImpl&lt;FocusMapper, FocusEntity&gt; implements FocusService{</b>
&nbsp;
&nbsp;
&nbsp;    @Override
&nbsp;    public ResponseResult&lt;Map&lt;String, Object&gt;&gt; addFocus(FocusEntity focusEntity) {
<b class="nc">&nbsp;        Long count = lambdaQuery().eq(FocusEntity::getBusertableId,focusEntity.getBusertableId())</b>
<b class="nc">&nbsp;                .eq(FocusEntity::getGoodstableId,focusEntity.getGoodstableId())</b>
<b class="nc">&nbsp;                .count();</b>
<b class="nc">&nbsp;        if (count &gt; 0){</b>
<b class="nc">&nbsp;            return ResponseResult.getMessageResult(null,&quot;A001&quot;);</b>
&nbsp;        } else {
<b class="nc">&nbsp;            focusEntity.setFocustime(new Date());</b>
<b class="nc">&nbsp;            if(save(focusEntity)){</b>
<b class="nc">&nbsp;                return ResponseResult.getMessageResult(null,&quot;A002&quot;);</b>
&nbsp;            }
<b class="nc">&nbsp;            return ResponseResult.getMessageResult(null,&quot;A003&quot;);</b>
&nbsp;        }
&nbsp;    }
&nbsp;
&nbsp;
&nbsp;}
</code>
</pre>
</div>

<script type="text/javascript">
(function() {
    var msie = false, msie9 = false;
    /*@cc_on
      msie = true;
      @if (@_jscript_version >= 9)
        msie9 = true;
      @end
    @*/

    if (!msie || msie && msie9) {
      hljs.highlightAll()
      hljs.initLineNumbersOnLoad();
    }
})();
</script>

<div class="footer">
    
    <div style="float:right;">generated on 2025-06-15 18:23</div>
</div>
</body>
</html>
